package LeetCode刷题;

/**
 * @program: Java_Study
 * @author: Xiaofan
 * @createTime: 2021-11-21 11:12
 * @description: Functions of this class is
 * 官方题解：
 * class CQueue {
 *     Deque<Integer> stack1;
 *     Deque<Integer> stack2;
 *
 *     public CQueue() {
 *         stack1 = new LinkedList<Integer>();
 *         stack2 = new LinkedList<Integer>();
 *     }
 *
 *     public void appendTail(int value) {
 *         stack1.push(value);
 *     }
 *Te
 *     public int deleteHead() {
 *         if(stack2.isEmpty()){//一定要等到第二栈为空！！！！！！！！！！！的时候，才能进行插入，不然的话顺序就乱了
 *             while(!stack1.isEmpty()){
 *                 stack2.push(stack1.pop());
 *             }
 *         }
 *         return stack2.isEmpty()?-1:stack2.pop();
 *     }
 * }
 **/
public class No两个栈实现队列 {

}